<!-- 波浪 -->
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <title>彩色波动效果</title>
        <link rel="stylesheet" href="./css/style.css">
    </head>
    <style>
        .container {
            width: 400px;
            height: 100px;
            /* background-color: var(--border-color); */
            display: flex;
            justify-content: space-around;
            align-items: center;
            perspective: 1000px;
            transform-style: preserve-3d;
            transform: rotateX(45deg);
        }

        .fence {
            position: relative;
            width: 10px;
            height: 100%;
            border-radius: 10px;
            animation: animate 1s ease-in-out infinite alternate both;
        }

        .fence:nth-child(1){
            background-color: var(--color1);
            animation-delay: 0s;
        }
        .fence:nth-child(2){
            background-color: var(--color2);
            animation-delay: 0.2s;
        }
        .fence:nth-child(3){
            background-color: var(--color3);
            animation-delay: 0.4s;
        }
        .fence:nth-child(4){
            background-color: var(--color4);
            animation-delay: 0.6s;
        }
        .fence:nth-child(5){
            background-color: var(--color5);
            animation-delay: 0.8s;
        }
        .fence:nth-child(6){
            background-color: var(--color6);
            animation-delay: 1.0s;
        }
        .fence:nth-child(7){
            background-color: var(--color7);
            animation-delay: 1.2s;
        }
        .fence:nth-child(8){
            background-color: var(--color8);
            animation-delay: 1.4s;
        }
        .fence:nth-child(9){
            background-color: var(--color1);
            animation-delay: 1.6s;
        }
        .fence:nth-child(10){
            background-color: var(--color2);
            animation-delay: 1.8s;
        }
        .fence:nth-child(11){
            background-color: var(--color3);
            animation-delay: 2.0s;
        }
        .fence:nth-child(12){
            background-color: var(--color4);
            animation-delay: 2.2s;
        }
        .fence:nth-child(13){
            background-color: var(--color5);
            animation-delay: 2.4s;
        }
        .fence:nth-child(14){
            background-color: var(--color6);
            animation-delay: 2.6s;
        }
        .fence:nth-child(15){
            background-color: var(--color7);
            animation-delay: 2.8s;
        }
        .fence:nth-child(16){
            background-color: var(--color8);
            animation-delay: 3s;
        }

        @keyframes animate {
            0% {
                transform:translateZ(-30px);
            }
            100% {
                transform:translateZ(30px);
            }
        }
    </style>
    <body>
        <div class="container">
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
            <div class="fence"></div>
        </div>
    </body>
</html>